package com.yaxin.outsourcing.domain.bo;

import com.yaxin.common.core.domain.BaseEntity;
import com.yaxin.common.core.validate.AddGroup;
import com.yaxin.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 外协人员信息业务对象 outsourcing_person
 *
 * @author yaxin
 * @date 2025-08-07
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class OutsourcingPersonBo extends BaseEntity {

    /**
     * 人员ID
     */
    @NotNull(message = "人员ID不能为空", groups = { EditGroup.class })
    private Long perId;

    /**
     * 所属申请单ID
     */
    @NotNull(message = "所属申请单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long appId;

    /**
     * 姓名
     */
    @NotBlank(message = "姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String userName;

    /**
     * 身份证号
     */
    @NotBlank(message = "身份证号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String idCard;

    /**
     * 联系方式
     */
    @NotBlank(message = "联系方式不能为空", groups = { AddGroup.class, EditGroup.class })
    private String userPhone;

    /**
     * IC卡编号
     */
    @NotBlank(message = "IC卡编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String icNo;

    /**
     * 进厂时间
     */
    @NotNull(message = "进厂时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date entryTime;

    /**
     * 结束时间
     */
    @NotNull(message = "结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date endTime;

    /**
     * 身份证正面照片
     */
    @NotBlank(message = "身份证正面照片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String idCardFront;

    /**
     * 身份证反面照片
     */
    @NotBlank(message = "身份证反面照片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String idCardBack;

    /**
     * 2寸免冠照片
     */
    @NotBlank(message = "2寸免冠照片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String portraitPhoto;

    /**
     * 状态（1-正常，0-失效）
     */
    @NotNull(message = "状态（1-正常，0-失效）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long status;

    /**
     * 新增人员
     */
    @NotBlank(message = "新增人员不能为空", groups = { AddGroup.class, EditGroup.class })
    private String createdBy;

    /**
     * 修改人员
     */
    @NotBlank(message = "修改人员不能为空", groups = { AddGroup.class, EditGroup.class })
    private String updatedBy;


}
